package szzy

import (
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type StudentProfileRouter struct{}

// InitStudentProfileRouter 初始化 学生档 路由信息
func (s *StudentProfileRouter) InitStudentProfileRouter(Router *gin.RouterGroup, PublicRouter *gin.RouterGroup) {
	SPRouter := Router.Group("SP").Use(middleware.OperationRecord())
	SPRouterWithoutRecord := Router.Group("SP")
	SPRouterWithoutAuth := PublicRouter.Group("SP")
	{
		SPRouter.POST("createStudentProfile", SPApi.CreateStudentProfile)             // 新建学生档
		SPRouter.DELETE("deleteStudentProfile", SPApi.DeleteStudentProfile)           // 删除学生档
		SPRouter.DELETE("deleteStudentProfileByIds", SPApi.DeleteStudentProfileByIds) // 批量删除学生档
		SPRouter.PUT("updateStudentProfile", SPApi.UpdateStudentProfile)              // 更新学生档
	}
	{
		SPRouterWithoutRecord.GET("findStudentProfile", SPApi.FindStudentProfile)       // 根据ID获取学生档
		SPRouterWithoutRecord.GET("getStudentProfileList", SPApi.GetStudentProfileList) // 获取学生档列表
	}
	{
		SPRouterWithoutAuth.GET("getStudentProfilePublic", SPApi.GetStudentProfilePublic) // 学生档开放接口
	}
}
